home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1990: Discy Business / Discy Business.2mg / DEV.CD / TOOLS / CLIBS / LIBRARIES / CINCLUDE / NOTESYN.H < prev    next >
Encoding:
C/C++ Source or Header  |  1988-08-01  |  3.3 KB  |  92 lines  |  [B0] Apple IIgs Source Code (0x000A)

  1. /******************************************** 
  2. ; File: NoteSyn.h 
  3. ; Copyright Apple Computer, Inc. 1986, 1987, 1988 
  4. ; All Rights Reserved 
  5. ********************************************/ 
  6.  
  7. #ifndef __types__ 
  8. #include <types.h> 
  9. #endif 
  10.  
  11. #ifndef __notesyn__ 
  12. #define __notesyn__ 
  13.  
  14. #define nsAlreadyInit        0x1901 /* error - Note Syn already initialized */
  15. #define nsSndNotInit         0x1902 /* error - Sound Tools not initialized */
  16. #define nsNotAvail           0x1921 /* error - generator not available */
  17. #define nsBadGenNum          0x1922 /* error - bad generator number */
  18. #define nsNotInit            0x1923 /* error - Note Syn not initialized */
  19. #define nsGenAlreadyOn       0x1924 /* error - generator already on */
  20.  
  21. #define soundWrongVer 0x1925 /*error - incompatible versions of Sound  and NoteSyn */
  22.  
  23. typedef struct Envelope { 
  24.      Byte     st1BkPt; /* Envelope -   */
  25.      Word     st1Increment; /* Envelope -   */
  26.      Byte     st2BkPt; /* Envelope -   */
  27.      Word     st2Increment; /* Envelope -   */
  28.      Byte     st3BkPt; /* Envelope -   */
  29.      Word     st3Increment; /* Envelope -   */
  30.      Byte     st4BkPt; /* Envelope -   */
  31.      Word     st4Increment; /* Envelope -   */
  32.      Byte     st5BkPt; /* Envelope -   */
  33.      Word     st5Increment; /* Envelope -   */
  34.      Byte     st6BkPt; /* Envelope -   */
  35.      Word     st6Increment; /* Envelope -   */
  36.      Byte     st7BkPt; /* Envelope -   */
  37.      Word     st7Increment; /* Envelope -   */
  38.      Byte     st8BkPt; /* Envelope -   */
  39.      Word     st8Increment; /* Envelope -   */
  40.     } Envelope, *EnvelopePtr, **EnvelopeHndl; 
  41.  
  42. typedef struct Waveform { 
  43.      Byte     wfTopKey; /* Waveform -   */
  44.      Byte     wfWaveAddress; /* Waveform -   */
  45.      Byte     wfWaveSize; /* Waveform -   */
  46.      Byte     wfDocMode; /* Waveform -   */
  47.      Word     wfRelPitch; /* Waveform -   */
  48.     } Waveform, *WaveformPtr, **WaveformHndl; 
  49.  
  50. #ifndef aWCount 
  51. #define aWCount 1 
  52. #endif 
  53.  
  54. #ifndef bWCount 
  55. #define bWCount 1 
  56. #endif 
  57.  
  58. typedef struct Instrument { 
  59.      Envelope theEnvelope; /* Instrument -   */
  60.      Byte     releaseSegment; /* Instrument -   */
  61.      Byte     priorityIncrement; /* Instrument -   */
  62.      Byte     pitchBendRange; /* Instrument -   */
  63.      Byte     vibratoDepth; /* Instrument -   */
  64.      Byte     vibratoSpeed; /* Instrument -   */
  65.      Byte     inSpare; /* Instrument -   */
  66.      Byte     aWaveCount; /* Instrument -   */
  67.      Byte     bWaveCount; /* Instrument -   */
  68.      Waveform aWaveList[aWCount]; 
  69.      Waveform bWaveList[bWCount]; 
  70.     } Instrument, *InstrumentPtr, **InstrumentHndl; 
  71.  
  72. extern pascal void  NSBootInit() inline(0x0119, dispatcher); 
  73. extern pascal void  NSStartUp() inline(0x0219, dispatcher); 
  74. extern pascal void  NSShutDown() inline(0x0319, dispatcher); 
  75. extern pascal Word  NSVersion() inline(0x0419, dispatcher); 
  76. extern pascal void  NSReset() inline(0x0519, dispatcher); 
  77. extern pascal Boolean  NSStatus() inline(0x0619, dispatcher); 
  78.  
  79. extern pascal void  AllNotesOff() inline(0x0D19, dispatcher); 
  80. extern pascal Word  AllocGen() inline(0x0919, dispatcher); 
  81. extern pascal void  DeallocGen() inline(0x0A19, dispatcher); 
  82. extern pascal void  NoteOff() inline(0x0C19, dispatcher); 
  83. extern pascal void  NoteOn() inline(0x0B19, dispatcher); 
  84. extern pascal void NSSetUpdateRate() inline(0x0E19,dispatcher); 
  85. extern pascal VoidProcPtr NSSetUserUpdateRtn() inline(0x0F19,dispatcher); 
  86.  
  87. #endif 
  88.  
  89.